package model

import "time"

type ServiceMod struct {
	ServiceId       int       `xorm:"NOT NULL AUTO_INCREMENT    PK  int(11)"`
	TypeId          string    `xorm:"null VARCHAR(255)"`
	ServiceTitle    string    `xorm:"null VARCHAR(255)"`
	ServiceSubTitle string    `xorm:"null VARCHAR(255)"`
	ServiceDes      string    `xorm:"null VARCHAR(255)"`
	ServiceImg      string    `xorm:"null VARCHAR(255)"`
	ServiceCon      string    `xorm:"default NULL TEXT"`
	Recommend       bool      `xorm:"null      tinyint(1)"`
	Hot             bool      `xorm:"null      tinyint(1)"`
	UserAccount     string    `xorm:"null VARCHAR(255)"`
	ClicksNumber    int       `xorm:"null int(255)"`
	CreateTime      time.Time `xorm:"not null    datetime"`
	UpdateTime      time.Time `xorm:"not null    datetime"`
}

func (v *ServiceMod) TableName() string {
	return "service"
}

type ServiceTypeMod struct {
	TypeId     int       `xorm:"NOT NULL     AUTO_INCREMENT    PK  int(11)"`
	TypeName   string    `xorm:"not null VARCHAR(255)"`
	ParentId   int       `xorm:"not null int(255)"`
	TypeImg    string    `xorm:"null VARCHAR(255)"`
	TypeDes    string    `xorm:"null VARCHAR(255)"`
	CreateTime time.Time `xorm:"null datetime"`
	UpdateTime time.Time `xorm:"null datetime"`
}

func (v *ServiceTypeMod) TableName() string {
	return "service_type"
}
